Check whether a string starts with specified charactersΒΆ

string.startswith(chars)

Check whether a string starts with specified characters.
string = "w3resource.com"

print(string.startswith("w3r"))                # True